package com.qingmeng.apiclientsdk.config;

import com.qingmeng.apiclientsdk.client.ApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration // 表明这是一个配置类
@ConfigurationProperties(prefix = "api.client") // 配置前缀
@Data // 自动生成getter、setter等方法
@ComponentScan // 扫描当前包及其子包
public class apiClientConfig {
    private String accessKey;
    private String secretKey;
    @Bean
    public ApiClient apiClient() {
        return new ApiClient(accessKey, secretKey);
    }

}
